% TEST_ID: LANG-EXPAND-0099
% CATEGORY: language/string
% 测试 string 的 brace 索引

function test_string_brace()
s = ["aaa", "bbb", "ccc"];
assert(s{1} == "aaa");
s{3:-1:1}
% ans =
%     'ccc'
% ans =
%     'bbb'
% ans =
%     'aaa'

s{1} = 'xxx';
assert(s == ["xxx", "bbb", "ccc"]);
s{1, 2} = 'yyy';
assert(s == ["xxx", "yyy", "ccc"]);
s = s
s{1, 2, 3} = 'zzz'
assert(s(:,:,1) == ["xxx", "yyy", "ccc"]);
assert(s(1, 2, 3) == "zzz");
% assert(s(:,:,2) == [missing, missing missing]);
% assert(s(:,:,3) == [missing "zzz", missing]);
end


test
